package com.wwwarehouse.usercenter.bean.authoritydistribute;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * @author : mundane
 * @time : 2017/9/25 19:47
 * @description :
 * @file : BatchAuthBean.java
 */

public class BatchAuthBean implements Parcelable {
	public String businessUnitId;
	public AuthProcessUkidBean authProcessUkidBean;
	public ArrayList<AuthorityDistributeItemBean> userBeanList;

	public BatchAuthBean(String businessUnitId, AuthProcessUkidBean authProcessUkidBean, ArrayList<AuthorityDistributeItemBean> userBeanList) {
		this.businessUnitId = businessUnitId;
		this.authProcessUkidBean = authProcessUkidBean;
		this.userBeanList = userBeanList;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(this.businessUnitId);
		dest.writeParcelable(this.authProcessUkidBean, flags);
		dest.writeTypedList(this.userBeanList);
	}

	protected BatchAuthBean(Parcel in) {
		this.businessUnitId = in.readString();
		this.authProcessUkidBean = in.readParcelable(AuthProcessUkidBean.class.getClassLoader());
		this.userBeanList = in.createTypedArrayList(AuthorityDistributeItemBean.CREATOR);
	}

	public static final Parcelable.Creator<BatchAuthBean> CREATOR = new Parcelable.Creator<BatchAuthBean>() {
		@Override
		public BatchAuthBean createFromParcel(Parcel source) {
			return new BatchAuthBean(source);
		}

		@Override
		public BatchAuthBean[] newArray(int size) {
			return new BatchAuthBean[size];
		}
	};
}
